import React, { Component } from 'react';
import { connect } from 'react-redux';

class Header1 extends Component {
	// 总数据
	state = {
		// 新增-弹窗开头
		mag: 'h111'
	}
	// 渲染函数
    render() {
    	const { orderSum } = this.props.loginUser;
    	const { flag1 } = this.props.loginPerm;
    	let spanMsg1 = null;
    	if (flag1) {
			spanMsg1 = <span>11</span>
		}else {
			spanMsg1 = <span>22</span>
		}

    	return (
			<div>
				321:orderSum:{orderSum}--flag1:
				{spanMsg1}
			</div>
		);
    }
};

export default connect(state => ({
	loginUser: state.loginUser,
	loginPerm: state.loginPerm,
}), {
})(Header1);